package day07.zuoye.One;

public class HiINC {
    private String ID;
    private double rent;
    private int days;

    public HiINC() {
    }

    public HiINC(String ID) {
        this.ID = ID;
        this.rent = 12;
    }

    public HiINC(String ID, double rent) {
        this.ID = ID;
        this.rent = rent * 0.001;
    }

    static double calculateRent(HiINC[] hi, int days) {
        double number = 0.0;
        for (HiINC a : hi)
            number += days * a.getRent();
        return number;
    }

    /**
     * 获取
     *
     * @return ID
     */
    public String getID() {
        return ID;
    }

    /**
     * 设置
     *
     * @param ID
     */
    public void setID(String ID) {
        this.ID = ID;
    }

    /**
     * 获取
     *
     * @return rent
     */
    public double getRent() {
        return rent;
    }

    /**
     * 设置
     *
     * @param rent
     */
    public void setRent(double rent) {
        this.rent = rent;
    }

    /**
     * 获取
     *
     * @return days
     */
    public int getDays() {
        return days;
    }

    /**
     * 设置
     *
     * @param days
     */
    public void setDays(int days) {
        this.days = days;
    }

    public String toString() {
        return "HiINC{ID = " + ID + ", rent = " + rent + ", days = " + days + "}";
    }
}
